package com.zr.util;

import lombok.Data;


/**
 * Created by Administrator on 2019/10/8.
 */
@Data
public class ResultVoBuilder<T> {
    public static ResultVo error(String errorcode, String errorMessage){
        ResultVo resultVo=new ResultVo();
        resultVo.setSuccess(false);
        resultVo.setErrorcode(errorcode);
        resultVo.setErrorMessage(errorMessage);
        return  resultVo;
    }
    public static<T> ResultVo success(){
        ResultVo resultVo=new ResultVo();
        resultVo.setSuccess(true);
        resultVo.setData(null);
        return resultVo;
    }
    public static<T> ResultVo success(T data){
        ResultVo resultVo=new ResultVo();
        resultVo.setSuccess(true);
        resultVo.setData(data);
        return resultVo;
    }


}
